#ifndef MAINPROJECT_H
#define MAINPROJECT_H

#include <QMainWindow>
#include <QVBoxLayout>
#include <QMouseEvent>
#include <QPoint>
#include "../DeviceManager/devicemanager.h"
#include "../Alertmanager/mainwidget.h"
#include "../Alertmanager/alertmanager.h"
#include "../DataMonitor/mainwindow.h"
#include "../SystemManager/systemmanager.h"
#include "../UserManager/adminmanager.h"
#include "datatest.h"
#include "loggermanager.h"
QT_BEGIN_NAMESPACE
namespace Ui {
class MainProject;
}
QT_END_NAMESPACE

class MainProject : public QMainWindow
{
    Q_OBJECT

public:
    MainProject(QWidget *parent = nullptr);
    ~MainProject();
    void connects();
public slots:
    void onSetDevicesManager();
    void onSetDatasManager();
    void onSetAlertsManager();
    void onSetUsersManager();
    void onSetSystemManager();
protected:
    void mousePressEvent(QMouseEvent *event);
    void mouseReleaseEvent(QMouseEvent *event);
    void mouseMoveEvent(QMouseEvent *event);
private:
    Ui::MainProject *ui;
    DeviceManager *m_pDeviceManager;    //设备管理界面
    MainWidget *m_pAlertManager;        //设备告警界面
    MainWindow *m_pDatamonitor;         //数据监控界面
    AdminManager *m_pUserManager;       //用户管理界面
    SystemManager *m_pSystemManager;    //系统管理界面
    QVBoxLayout *mainVLayout;           //主界面垂直布局
    Datatest *dataTest;                 //数据测试类
    QPoint m_pMove;                     //主界面移动矢量
    bool m_pMousePressedFlag;           //主界面移动标志
    bool maxWindowflag;                 //窗口最大化标志

};
#endif // MAINPROJECT_H
